import moment from 'moment'

export const columns=[
    {
        title: '扫描编号',
        dataIndex: 'id'
    },
    {
        title: '模板名称',
        dataIndex: 'tempname'
    },
    {
        title: '截止时间',
        dataIndex: 'overtime',
        slots:{
            customRender:'overtime'
        },
        slotsType:'format',
        slotsFunc:(val)=>{
            return moment(Number(val)).format("YYYY-MM-DD HH:mm:ss")
        }
    },
    {
        title: "任务状态",
        dataIndex: 'overtime',
        slots: {
            customRender: 'state'
        },
        slotsType: 'format',
        slotsFunc:(val)=>{
            if(moment().isBefore(moment(Number(val)))){
                return "进行中"
            }
            else {
                return "已截止"
            }
        }
    }
]
